package com.newland.esp.common.exception.code;



public enum BaseResponseCode implements ResponseCodeInterface {
    /**
     * 错误码
     */
    SUCCESS(200, "操作成功"),
    ERROR(400, "失败"),
    PASS_ERROR_01(501, "两次输入的密码不一致"),
    PASS_ERROR_02(502, "输入的原始密码不正确"),
    PASS_ERROR_03(503, "输入的验证码不正确"),
    PASS_ERROR_04(504, "用户名或者密码错误"),
    SYSTEM_BUSY(500001, "系统繁忙，请稍候再试"),
    OPERATION_ERRO(500002, "操作失败"),
    SYSTEM_ERROR(500003, "系统异常"),

    TOKEN_ERROR(401001, "登录凭证已过期，请重新登录"),
    DATA_ERROR(401003, "传入数据异常"),
    NOT_ACCOUNT(401004, "该用户不存在,请先注册"),
    USER_LOCK(401005, "该用户已被锁定，请联系运营人员"),
    OLD_PASSWORD_ERROR(401010, "旧密码不正确"),
    NOT_PERMISSION_DELETED_DEPT(401011, "该组织机构下还关联着用户，不允许删除"),
    USER_ACTIVATE(401018, "该用户未激活，请邮件激活"),
    USER_APPROVAL(401019, "该用户未审批，请联系运营人员"),
    USER_DEL(401020, "该用户已失效"),
    ERROR_401021(401021, "数据异常"),
    ERROR_401023(401023, "文件上传失败"),
    USER_ROLE_ERROR(401024, "没有开发者权限，禁止登录！"),
    ERROR_401031(401031, "应用不存在，请联系运营人员"),
    ERROR_401037(401037, "参数类型错误"),
    ;

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误消息
     */
    private final String msg;

    BaseResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
